<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<!-- 因为 AJAX 库和通用工具的生态已经相当丰富，Vue 核心代码没有重复 -->
		<!-- 提供这些功能以保持精简。这也可以让你自由选择自己更熟悉的工具。 -->
		<script src="https://cdn.jsdelivr.net/npm/axios@0.12.0/dist/axios.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/lodash@4.13.1/lodash.min.js"></script>
	</head>
	<body>
		<div id="demo">
			<button v-on:click="show=!show">
				开关
			</button>
			<transition name="fade">
				<p v-if="show">hello</p>
			</transition>
		</div>	
		<script type="text/javascript">
			 //单元素,组件的过度
			 let app=new Vue({
				 el:'#demo',
				 data:{
					 show:true,
				 }
			 })
		</script>	
		<style>
			.fade-enter-active, .fade-leave-active {
			  transition: opacity .5s;
			}
			.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
			  opacity: 0;
			}
		</style>
	</body>
</html>
